Array.prototype.my_forEach = function(cb){
    for(let i = 0; i<this.length; i++){
        cb(this[i],i,this);
    }
}
let arr1=[1,2,3,4,5]
arr1.my_forEach((item, index, arr)=>{
    console.log(item, index, arr)
})